package custcare

import (
	"github.com/gin-gonic/gin"
	v1 "wave-admin/controller/v1"
	"wave-admin/middleware"
)

type VisitorRouter struct{}

func (s *VisitorRouter) InitVisitorRouter(Router *gin.RouterGroup) {
	visitorRouterWithoutRecord := Router.Group("/visitor")
	visitorRouter := Router.Group("/visitor").Use(middleware.Record())
	visitorApi := v1.ApiGroupApp.CustCareGroup.VisitorApi
	{
		visitorRouter.POST("/set_msg_read", visitorApi.SetMsgRead)
		visitorRouter.PUT("/detail/:id", visitorApi.UpdateVisitorDetail)
		visitorRouter.POST("/ipblack", visitorApi.VisitorIpBlack)
		visitorRouter.POST("/trailNewCustcare", visitorApi.TrailNewCustcare)
	}
	{
		visitorRouterWithoutRecord.GET("/getList", visitorApi.VisitorList)
		visitorRouterWithoutRecord.GET("/talkList", visitorApi.GetTalkList)
		visitorRouterWithoutRecord.GET("/visitor/:id", visitorApi.Visitor)
		visitorRouterWithoutRecord.GET("/unread_msg_count", visitorApi.GetUnreadMsgCount)
		visitorRouterWithoutRecord.GET("/getTrailList", visitorApi.GetTrailList)
		visitorRouterWithoutRecord.GET("/getCustcareList", visitorApi.GetCustcareList)
	}
}
